package com.aqie.rabbit.service.Impl;

import com.aqie.rabbit.bean.db.PushHistory;
import com.aqie.rabbit.repositories.PushHistoryRepository;
import com.aqie.rabbit.service.IPushHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class PushHistoryServiceImpl implements IPushHistoryService {

    @Autowired
    private PushHistoryRepository pushHistoryRepository;

    @Override
    @Transactional
    public PushHistory save(PushHistory pushHistory) {
        return pushHistoryRepository.save(pushHistory);
    }

    @Override
    @Transactional
    public List<PushHistory> saveAll(List<PushHistory> histories) {
        return pushHistoryRepository.saveAll(histories);
    }
}
